<?php

namespace app\admin\model;

use think\Model;

class NoticeRead extends Model
{
    public static function getNoticeReadCount($noticeId)
    {
        return self::where(['nid' => $noticeId])->count();
    }

    public static function getNoticeRead($noticeId, $userId)
    {
        return self::where(['nid' => $noticeId, 'uid' => $userId])->find();
    }
}